<template>
	<view >
		<view class="lineGray"></view>
		<view class="padding">
			<view v-for="(item,index) in data" :key="item.index">
				<view class=" padding textBlack24">{{item.key}}</view>
				<view v-for="(item1,index1) in item.value" :key="index1">
					<view>
						<view class="padding"> <text class="textblack16 ">积分充值支付{{item1.formatMoney}}元</text></view>
						<view class="line padding">
							<view class="textgray14 bigEmpty"> {{item1.updateTimeShortFormat}}</view>
							<view class="marginLeft textgray14"> +{{item1.coin}}</view>
							<image class="marginLeft smallIcon" src="../../static/orangestar.png"></image>
						</view>
						<view class="lineGray"></view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from "/common/request.js";
	export default {
		data() {
			return {
				data: []
			}
		},
		onShareAppMessage(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},
		// 自定义页面的分享到朋友圈
		onShareTimeline(res) {
			return {
				title: '设辑-产品设计智能生成AI',
				path: '/pages/HomePage/HomePage',
				imageUrl: '/static/black-logo.png'
			}
		},
		onReady: function() {
			this.requstData();
		},
		methods: {
			requstData() {
				const that = this;
				const url = getApp().globalData.apiUrl + "/api/v1/order/all";
				request(url, "GET", {
					}, uni.getStorageSync("token"))
					.then(function(res) {
						console.log('返回正确回调', res)
						that.data = that.data.concat(res.data);
					}, function(err) {
						console.log('返回错误回调', err)
					})
			}

		}
	}
</script>

<style>
	@import "../../common/uni.css";

	.smallIcon {
		width: 23.47px;
		height: 23.47px;
	}
</style>